// cstdio standard header
#ifndef _CSTDIO_
#define _CSTDIO_
#include <yvals.h>

#ifdef _STD_USING
 #undef _STD_USING
  #include <stdio.h>
 #define _STD_USING

#else /* _STD_USING */
 #include <stdio.h>
#endif /* _STD_USING */

// undef common macro overrides
 #undef clearerr
 #undef feof
 #undef ferror
 #undef getc
 #undef getchar
 #undef putc
 #undef putchar

 #if defined(__GLIBC__)	/* compiler test */

  #if __GNUC__ < 3
_C_STD_BEGIN
_C_LIB_DECL
FILE *fdopen(int, const char *);
int fileno(FILE *);
int fwide(FILE *, int);
_END_C_LIB_DECL
_C_STD_END
  #endif /* __GNUC__ < 3 */

  #define _HAS_POINTER_CLIB	1
  #define _RBEGIN	_IO_read_base
  #define _RNEXT	_IO_read_ptr
  #define _REND		_IO_read_end
  #define _WBEGIN	_IO_write_base
  #define _WNEXT	_IO_write_ptr
  #define _WEND		_IO_write_end
 #endif /* defined(__GLIBC__) */

 #if defined(__APPLE__)	/* compiler test */
_C_STD_BEGIN
_C_LIB_DECL
int fwide(FILE *, int);
_END_C_LIB_DECL
_C_STD_END

  #undef fileno

  #define _IOBASE	_bf._base
  #define _IOPTR	_p
  #define _IORCNT	_r
  #define _IOWCNT	_w
 #endif /* defined(__APPLE__) */

 #if !defined(__GLIBC__) && !defined(__APPLE__)	/* compiler test */

  #if defined(__BORLANDC__)
   #undef fileno

   #define _IOBASE	buffer
   #define _IOPTR	curp
   #define _IOCNT	level

_C_STD_BEGIN
_C_LIB_DECL
int fwide(FILE *, int);
_END_C_LIB_DECL
_C_STD_END

  #else	/* elif defined(__sun) */
   #define _IOBASE	_base
   #define _IOPTR	_ptr
   #define _IOCNT	_cnt
  #endif /* defined(__BORLANDC__) */

 #endif /* !defined(__GLIBC__) etc. */

 #if defined(_WIN32_C_LIB) && !defined(__BORLANDC__)	/* compiler test */
  #undef fileno

_C_STD_BEGIN
_C_LIB_DECL
FILE *fdopen(int, const char *);
int fileno(FILE *);
_END_C_LIB_DECL
_C_STD_END
 #endif /* defined(_WIN32_C_LIB) etc. */

 #ifndef _HAS_POINTER_CLIB
  #define _HAS_CONVENTIONAL_CLIB	1
 #endif /* _HAS_POINTER_CLIB */

#ifndef _FPOSOFF

 #if defined(__GLIBC__)	/* compiler test */ \
	&& !(__GLIBC__ < 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ < 2)
  #define _FPOSOFF(fp)  ((long)(fp).__pos)

 #else /* defined(__GLIBC__) etc. */
  #define _FPOSOFF(fp)  ((long)(fp))
 #endif /* defined(__GLIBC__) etc. */

#endif /* _FPOSOFF */

typedef FILE _Filet;

 #ifdef _GLOBAL_USING
_STD_BEGIN
using _CSTD _Filet;

using _CSTD size_t; using _CSTD fpos_t; using _CSTD FILE;
using _CSTD clearerr; using _CSTD fclose; using _CSTD feof;
using _CSTD ferror; using _CSTD fflush; using _CSTD fgetc;
using _CSTD fgetpos; using _CSTD fgets; using _CSTD fopen;
using _CSTD fprintf; using _CSTD fputc; using _CSTD fputs;
using _CSTD fread; using _CSTD freopen; using _CSTD fscanf;
using _CSTD fseek; using _CSTD fsetpos; using _CSTD ftell;
using _CSTD fwrite; using _CSTD getc; using _CSTD getchar;
using _CSTD gets; using _CSTD perror;
using _CSTD putc; using _CSTD putchar;
using _CSTD printf; using _CSTD puts; using _CSTD remove;
using _CSTD rename; using _CSTD rewind; using _CSTD scanf;
using _CSTD setbuf; using _CSTD setvbuf; using _CSTD sprintf;
using _CSTD sscanf; using _CSTD tmpfile; using _CSTD tmpnam;
using _CSTD ungetc; using _CSTD vfprintf; using _CSTD vprintf;
using _CSTD vsprintf;

 #if _HAS_C9X
using _CSTD snprintf; using _CSTD vsnprintf;
using _CSTD vfscanf; using _CSTD vscanf; using _CSTD vsscanf;
 #endif /* _HAS_C9X */
_STD_END
 #endif /* _GLOBAL_USING */

#endif /* _CSTDIO_ */

/*
 * Copyright (c) by P.J. Plauger. All rights reserved.
 * Consult your license regarding permissions and restrictions.
V6.50:1422 */
